﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ObterRankPorUser]
	@UserID as int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT
	J.Derrotas,
	J.Empates,
	J.[Golos Marcados],
	J.[Golos Sofridos],
	J.IDJogador,
	J.MVP,
	J.Pontos,
	J.UserID,
	J.Vitorias,
	U.NomeUtilizador
	FROM Jogadores J
	INNER JOIN Utilizadores U
	ON j.UserID = u.IDUser
	Where J.UserID = @UserID
END